Optimal. Leaf size=115 \[ -\frac {x}{3}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {2 \tanh ^{-1}(a x)^2}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {4 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{3 a}-\frac {2 \text {PolyLog}\left (2,1-\frac {2}{1-a x}\right )}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {6091, 6021,
6131, 6055, 2449, 2352, 8} \begin {gather*} \frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}-\frac {2 \text {Li}_2\left (1-\frac {2}{1-a x}\right )}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {2 \tanh ^{-1}(a x)^2}{3 a}-\frac {4 \log \left (\frac {2}{1-a x}\right ) \tanh ^{-1}(a x)}{3 a}-\frac {x}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2352
Rule 2449
Rule 6021
Rule 6055
Rule 6091
Rule 6131
Rubi steps
\begin {align*} \int \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2 \, dx &=\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {\int 1 \, dx}{3}+\frac {2}{3} \int \tanh ^{-1}(a x)^2 \, dx\\ &=-\frac {x}{3}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {1}{3} (4 a) \int \frac {x \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx\\ &=-\frac {x}{3}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {2 \tanh ^{-1}(a x)^2}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {4}{3} \int \frac {\tanh ^{-1}(a x)}{1-a x} \, dx\\ &=-\frac {x}{3}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {2 \tanh ^{-1}(a x)^2}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {4 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{3 a}+\frac {4}{3} \int \frac {\log \left (\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx\\ &=-\frac {x}{3}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {2 \tanh ^{-1}(a x)^2}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {4 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{3 a}-\frac {4 \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-a x}\right )}{3 a}\\ &=-\frac {x}{3}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{3 a}+\frac {2 \tanh ^{-1}(a x)^2}{3 a}+\frac {2}{3} x \tanh ^{-1}(a x)^2+\frac {1}{3} x \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2-\frac {4 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{3 a}-\frac {2 \text {Li}_2\left (1-\frac {2}{1-a x}\right )}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 71, normalized size = 0.62 \begin {gather*} -\frac {a x+(-1+a x)^2 (2+a x) \tanh ^{-1}(a x)^2+\tanh ^{-1}(a x) \left (-1+a^2 x^2+4 \log \left (1+e^{-2 \tanh ^{-1}(a x)}\right )\right )-2 \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(a x)}\right )}{3 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.55, size = 154, normalized size = 1.34
method | result | size |
derivativedivides | \(\frac {-\frac {\arctanh \left (a x \right )^{2} a^{3} x^{3}}{3}+\arctanh \left (a x \right )^{2} a x -\frac {a^{2} x^{2} \arctanh \left (a x \right )}{3}+\frac {2 \arctanh \left (a x \right ) \ln \left (a x -1\right )}{3}+\frac {2 \arctanh \left (a x \right ) \ln \left (a x +1\right )}{3}-\frac {a x}{3}-\frac {\ln \left (a x -1\right )}{6}+\frac {\ln \left (a x +1\right )}{6}-\frac {2 \dilog \left (\frac {a x}{2}+\frac {1}{2}\right )}{3}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{3}+\frac {\ln \left (a x -1\right )^{2}}{6}+\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{3}-\frac {\ln \left (a x +1\right )^{2}}{6}}{a}\) | \(154\) |
default | \(\frac {-\frac {\arctanh \left (a x \right )^{2} a^{3} x^{3}}{3}+\arctanh \left (a x \right )^{2} a x -\frac {a^{2} x^{2} \arctanh \left (a x \right )}{3}+\frac {2 \arctanh \left (a x \right ) \ln \left (a x -1\right )}{3}+\frac {2 \arctanh \left (a x \right ) \ln \left (a x +1\right )}{3}-\frac {a x}{3}-\frac {\ln \left (a x -1\right )}{6}+\frac {\ln \left (a x +1\right )}{6}-\frac {2 \dilog \left (\frac {a x}{2}+\frac {1}{2}\right )}{3}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{3}+\frac {\ln \left (a x -1\right )^{2}}{6}+\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{3}-\frac {\ln \left (a x +1\right )^{2}}{6}}{a}\) | \(154\) |
risch | \(-\frac {x}{3}-\frac {2 \dilog \left (\frac {a x}{2}+\frac {1}{2}\right )}{3 a}-\frac {5 \ln \left (a x -1\right )}{9 a}+\frac {a^{2} \ln \left (-a x +1\right ) \ln \left (a x +1\right ) x^{3}}{6}-\frac {\left (-1+\ln \left (a x +1\right )\right ) \left (a x +1\right ) \ln \left (-a x +1\right )}{2 a}-\frac {x \ln \left (-a x +1\right )}{2}-\frac {a^{2} \ln \left (a x +1\right )^{2} x^{3}}{12}-\frac {a \ln \left (a x +1\right ) x^{2}}{6}-\frac {37}{54 a}+\frac {\ln \left (-a x +1\right )^{2} x}{4}-\frac {\ln \left (-a x +1\right )^{2}}{6 a}-\frac {\ln \left (-a x +1\right )}{9 a}+\frac {\ln \left (a x +1\right )^{2} x}{4}+\frac {\ln \left (a x +1\right )^{2}}{6 a}-\frac {\ln \left (a x +1\right ) x}{2}-\frac {\ln \left (a x +1\right )}{3 a}-\frac {a^{2} \ln \left (-a x +1\right )^{2} x^{3}}{12}+\frac {a \ln \left (-a x +1\right ) x^{2}}{6}+\frac {\ln \left (-a x +1\right ) \ln \left (a x +1\right )}{6 a}-\frac {\ln \left (-\frac {a x}{2}+\frac {1}{2}\right ) \ln \left (a x +1\right )}{3 a}+\frac {\ln \left (-\frac {a x}{2}+\frac {1}{2}\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{3 a}+\frac {\left (a x +1\right ) \ln \left (a x +1\right )}{2 a}+\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{a}\) | \(327\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 144, normalized size = 1.25 \begin {gather*} -\frac {1}{6} \, a^{2} {\left (\frac {2 \, a x + \log \left (a x + 1\right )^{2} - 2 \, \log \left (a x + 1\right ) \log \left (a x - 1\right ) - \log \left (a x - 1\right )^{2} + \log \left (a x - 1\right )}{a^{3}} + \frac {4 \, {\left (\log \left (a x - 1\right ) \log \left (\frac {1}{2} \, a x + \frac {1}{2}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, a x + \frac {1}{2}\right )\right )}}{a^{3}} - \frac {\log \left (a x + 1\right )}{a^{3}}\right )} - \frac {1}{3} \, {\left (x^{2} - \frac {2 \, \log \left (a x + 1\right )}{a^{2}} - \frac {2 \, \log \left (a x - 1\right )}{a^{2}}\right )} a \operatorname {artanh}\left (a x\right ) - \frac {1}{3} \, {\left (a^{2} x^{3} - 3 \, x\right )} \operatorname {artanh}\left (a x\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int a^{2} x^{2} \operatorname {atanh}^{2}{\left (a x \right )}\, dx - \int \left (- \operatorname {atanh}^{2}{\left (a x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int {\mathrm {atanh}\left (a\,x\right )}^2\,\left (a^2\,x^2-1\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________